#!/usr/bin
path_cmd=$(pwd)
path=$(echo $path_cmd)
result=$(echo $path | grep "/Users/wangjun")
if [[ "$result" != "" ]];then
    echo "本地"
    #local
    echo "1.拉取服务器代码"
    cm1=$(git pull origin master)
     echo "2.添加本地更新"
    cm2=$(git add *)
    echo "3.提交本地更新"
    cm3=$(git ci -am 'auto commit')
    echo "4.提交服务器"
    cm4=$(git push origin master)
    echo 'git done'
else
#web
     echo "1.拉取服务器代码"
        cm1=$(git pull origin master)
         echo "2.添加本地更新"
        cm2=$(git add *)
        echo "3.提交本地更新"
        cm3=$(git ci -am 'auto commit')
        echo "4.提交服务器"
        cm4=$(git push origin master)
        echo 'git done'
fi








